package com.core.website.service.impl;

import com.core.website.entity.DutyUser;
import com.core.website.mapper.DutyUserMapper;
import com.core.website.service.DutyUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.UUID;

@Service
public class DutyUserServiceImpl implements DutyUserService {
    @Autowired
    private DutyUserMapper dutyUserMapper;
    @Override
    public int addUser(DutyUser dutyUser) {
        dutyUser.setId(UUID.randomUUID().toString().toUpperCase().replace("-", ""));
        return dutyUserMapper.addUser(dutyUser);
    }

    @Override
    public int delUser(List<String> list) {
        return dutyUserMapper.delUser(list);
    }

    @Override
    public List<DutyUser> queryPage(DutyUser dutyUser) {
        return dutyUserMapper.queryPage(dutyUser);
    }

    @Override
    public int updateUserById(DutyUser dutyUser) {
        return dutyUserMapper.updateUserById(dutyUser);
    }
}
